-- Decodificador BCD para Display de 7 Segmentos

library ieee;
use ieee.std_logic_1164.all;

entity BCD_7SEG is
	port(
		A : in std_logic_vector(3 downto 0);
		S : out std_logic_vector(6 downto 0)
	);
end BCD_7SEG;

architecture DT_FLOW of BCD_7SEG is
signal ENTRADA : std_logic_vector(3 downto 0);
begin
	ENTRADA <= A;
	process (ENTRADA)
	begin
		case (ENTRADA) is
			when "0000" =>
				S <= "1000000";--1111110";
			when "0001" =>
				S <= "1111001";--"0110000";
			when "0010" =>
				S <= "0100100";--"1101101";
			when "0011" =>
				S <= "0110000";--"1111001";
			when "0100" =>
				S <= "0011001";--"0110011";
			when "0101" =>
				S <= "0010010";--"1011011";
			when "0110" =>
				S <= "0000010";--"1011111";
			when "0111" =>
				S <= "1111000";--"1110000";
			when "1000" =>
				S <= "0000000";--"1111111";
			when "1001" =>
				S <= "0010000";--"1111011";
			when others =>
				null;
		end case;
	end process;
	
end DT_FLOW;
